import http from '@/utils/request'

export const businessApi = {
    // 获取商家信息
    getBusinessById(businessId) {
        return http.post('BusinessController/getBusinessById', {
            businessId: parseInt(businessId)
        })
    },

    // 获取商家的食品列表
    listFoodByBusinessId(businessId) {
        return http.post('FoodController/listFoodByBusinessId', {
            businessId
        })
    },

    // 根据类型获取商家列表
    listBusinessByOrderTypeId(orderTypeId) {
        return http.post('BusinessController/listBusinessByOrderTypeId', {
            orderTypeId
        })
    },

    // 获取食品详情
    getFoodById(foodId) {
        return http.post('FoodController/getFoodById', {
            foodId: foodId
        })
    }
}

export default businessApi 